<template>
    <div>
        <div class="title">周末去哪儿</div>
        <div class="item" v-for="item of weekendList" :key="item.id">
            <div class="item-img-wrapper">
                <img class="item-img" :src="item.imgUrl" />
            </div>
            <div class="item-info">
                <p class="item-title">{{ item.title }}</p>
                <p class="item-desc">{{ item.desc }}</p>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name: 'HomeWeekend',
    props: {
        weekendList: Array
    }
}
</script>

<style lang="stylus" scoped>
    @import '~styles/mixins.styl'

    .title
        line-height .8rem
        background #eeeeee
        padding-left .2rem
    .item
        .item-img-wrapper
            height 0
            padding-bottom 37%
            overflow hidden
            .item-img
                display block
                width 100%
        .item-info
            padding .2rem
            .item-title
                line-height .48rem
                font-size .28rem
                color #212121
                ellipsis()
            .item-desc
                line-height .42rem
                font-size .24rem
                color #616161
                ellipsis()
</style>

